using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class SkeletonMove : SkeletonGroundState
{
    public SkeletonMove(Enemy _enemybase, EnemyStateMachine _stateMachine, string _animBoolName, Enemy_Skeleton _enemy) : base(_enemybase, _stateMachine, _animBoolName, _enemy)
    {
    }

    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();
    }

    public override void Update()
    {
        
        base.Update();
        enemy.SetVelocity(2 * enemyBase.moveSpeed *enemyBase.facingDir , 0);
        if (!enemy.IsGroundDected() || enemy.IsWallDected())
        {
            enemy.Flip();
        }
    }
}
